home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / smaltalk / gnu_st.lha / gnu_st / smalltalk-1.1.1 / mk_mst_diffs < prev    next >
Text File  |  1991-09-12  |  1KB  |  44 lines

  1. #!/bin/csh -f
  2.  
  3. # This file computes the differences between the original version of the 
  4. # GNU Smalltalk source files and the current version of the same.  It's
  5. # end result is the file mst.diffs that contains those differences in a format
  6. # that can be applied to patch to upgrade some other person's version of
  7. # GNU Smalltalk to your current version.
  8.  
  9. # The entire process is driven off the file "mstfiles".  This file contains the
  10. # names of all of the files that make up the GNU Smalltalk distribution.  If
  11. # you add any files, you should be sure to add them to this file.
  12.  
  13. set path=($cwd $path)        # make sure that any cd's don't lose us
  14.  
  15. print_file_names `cat mstfiles` | sort > mstfiles.srt
  16.  
  17. print_file_names -d ./orig `cat ./orig/mstfiles` | sort > mstfiles.osrt
  18.  
  19. comm -23 mstfiles.srt mstfiles.osrt > mstfiles.dif
  20.  
  21. foreach file (`cat mstfiles.dif`)
  22.     if ( -d $file )  then 
  23.     echo "You created new directory '$file'"
  24.       mkdir ./orig/$file
  25.     else 
  26.     echo "You created new file '$file'"
  27.     touch ./orig/$file 
  28.     endif
  29. end
  30. rm -rf mstfiles.osrt mstfiles.dif mst.diffs
  31.  
  32. foreach file (`cat mstfiles.srt`)
  33.     if (-f ${file} ) then
  34.     diff -c ./orig/${file} ./${file} > a.diff
  35.     if (${status} == 1) then
  36.         cat a.diff >> mst.diffs
  37.     endif
  38.     endif
  39. end
  40.  
  41. rm -rf mstfiles.srt a.diff
  42.  
  43. exit 0
  44.